﻿<controls:ChildWindow x:Class="AdventureWorksLT.Views.Customers.ChildWindows.CustomerCW"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
mc:Ignorable="d"
Title="CustomerEditWindow"
xmlns:viewModels="clr-namespace:AdventureWorksLT.Views.Customers.ViewModels" 
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:appControls="clr-namespace:AdventureWorksLT.Controls">
<!--15 Fields --> 
    <controls:ChildWindow.Resources>
        <viewModels:CustomersViewModel x:Key="CustomersViewModel"></viewModels:CustomersViewModel>
    </controls:ChildWindow.Resources>
    <appControls:BusyIndicator x:Name="BusyIndicator" BusyContent="Loading Patients data...." DataContext="{Binding Source={StaticResource CustomersViewModel}}" Foreground="SlateGray" IsBusy="{Binding IsBusy}">
<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource CustomersViewModel}}" Background="WhiteSmoke" >
        <Border BorderBrush="#FF505050"  BorderThickness="2"  CornerRadius="10">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#EDD1DE86" Offset="0.8" />
                    <GradientStop Color="AliceBlue" Offset="1.09" />
                </LinearGradientBrush>
          </Border.Background>
<ScrollViewer x:Name="scrollViewerCustomer" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
<Grid HorizontalAlignment="Left" x:Name="CustomerGrid" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
    <ColumnDefinition Width="30" />
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="Auto" />
	<ColumnDefinition Width="50" />
	<ColumnDefinition Width="Auto" />
	<ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>


<StackPanel Grid.Column="1" Grid.Row="1" Orientation="vertical"  >
<TextBlock Height="20" Margin="0,5" ToolTipService.ToolTip="Id" ToolTipService.Placement="Right" Text="Id:"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Name Style" ToolTipService.Placement="Right" Text="Name Style:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Title" ToolTipService.Placement="Right" Text="Title:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="First Name" ToolTipService.Placement="Right" Text="First Name:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Middle Name" ToolTipService.Placement="Right" Text="Middle Name:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Last Name" ToolTipService.Placement="Right" Text="Last Name:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Suffix" ToolTipService.Placement="Right" Text="Suffix:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Company Name" ToolTipService.Placement="Right" Text="Company Name:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Sales Person" ToolTipService.Placement="Right" Text="Sales Person:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Email Address" ToolTipService.Placement="Right" Text="Email Address:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Phone" ToolTipService.Placement="Right" Text="Phone:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Password Hash" ToolTipService.Placement="Right" Text="Password Hash:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Password Salt" ToolTipService.Placement="Right" Text="Password Salt:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Rowguid" ToolTipService.Placement="Right" Text="Rowguid:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Modified Date" ToolTipService.Placement="Right" Text="Modified Date:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />

</StackPanel>
<StackPanel Grid.Column="2" Grid.Row="1" Orientation="vertical"  >
<TextBlock  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="CustomerIDTextBox" Text="{Binding Path=CurrentCustomers.CustomerID, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" />
<CheckBox ToolTipService.ToolTip="Name Style" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="NameStyleCheckBox" IsChecked="{Binding Path=CurrentCustomers.NameStyle, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<TextBox ToolTipService.ToolTip="Title" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="TitleTextBox" Text="{Binding Path=CurrentCustomers.Title, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="8"/>
<TextBox ToolTipService.ToolTip="First Name" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="FirstNameTextBox" Text="{Binding Path=CurrentCustomers.FirstName, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  Background="#FFFFFFDC"  MaxLength="50"/>
<TextBox ToolTipService.ToolTip="Middle Name" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="MiddleNameTextBox" Text="{Binding Path=CurrentCustomers.MiddleName, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="50"/>
<TextBox ToolTipService.ToolTip="Last Name" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="LastNameTextBox" Text="{Binding Path=CurrentCustomers.LastName, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  Background="#FFFFFFDC"  MaxLength="50"/>
<TextBox ToolTipService.ToolTip="Suffix" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="SuffixTextBox" Text="{Binding Path=CurrentCustomers.Suffix, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="10"/>
<TextBox ToolTipService.ToolTip="Company Name" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="CompanyNameTextBox" Text="{Binding Path=CurrentCustomers.CompanyName, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="128"/>
<TextBox ToolTipService.ToolTip="Sales Person" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="SalesPersonTextBox" Text="{Binding Path=CurrentCustomers.SalesPerson, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="256"/>
<TextBox ToolTipService.ToolTip="Email Address" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="EmailAddressTextBox" Text="{Binding Path=CurrentCustomers.EmailAddress, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="50"/>
<TextBox ToolTipService.ToolTip="Phone" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="PhoneTextBox" Text="{Binding Path=CurrentCustomers.Phone, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="25"/>
<TextBox ToolTipService.ToolTip="Password Hash" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="PasswordHashTextBox" Text="{Binding Path=CurrentCustomers.PasswordHash, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  Background="#FFFFFFDC"  MaxLength="128"/>
<TextBox ToolTipService.ToolTip="Password Salt" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="PasswordSaltTextBox" Text="{Binding Path=CurrentCustomers.PasswordSalt, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  Background="#FFFFFFDC"  MaxLength="10"/>
<TextBox ToolTipService.ToolTip="Rowguid" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="rowguidTextBox" Text="{Binding Path=CurrentCustomers.rowguid, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  Background="#FFFFFFDC" />
<sdk:DatePicker ToolTipService.ToolTip="Modified Date" ToolTipService.Placement="Right"  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="ModifiedDateDatePicker" SelectedDate="{Binding Path=CurrentCustomers.ModifiedDate, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />

</StackPanel>
                        <StackPanel Margin="0,10" Grid.Column="0" Grid.Row="2" Orientation="Horizontal"  Grid.ColumnSpan="3">
                            <Button Margin="20,0,0,0" Style="{StaticResource GreenButton}" x:Name="CancelButton" Content="Cancel"  Background="Blue" Width="75" Height="23" HorizontalAlignment="Right" Click="CancelButton_Click" />
                            <Button Margin="20,0,0,0" Style="{StaticResource OrangeButton}" x:Name="SaveButton" Content="Save" Background="Green" Width="75" Height="23" HorizontalAlignment="Right" Command="{Binding SaveCommand}" />
                        </StackPanel>
    
    
      
        </Grid>
        </ScrollViewer>
        </Border>
    </Grid>
    </appControls:BusyIndicator>
</controls:ChildWindow>
